﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FrameOperateSync
{
    static class Loger
    {
        private static IFrameLoger _loger;
        public static void SetLoger(IFrameLoger loger)
        {
            _loger = loger;
        }

        public static void Log(string msg)
        {
            if (_loger == null)
                throw new System.Exception("IFrameLoger is not invalid");
            _loger.LogInfo(msg);
        }
        public static void LogWarning(string msg)
        {
            if (_loger == null)
                throw new System.Exception("IFrameLoger is not invalid");
            _loger.LogWarning(msg);
        }
        public static void LogError(string msg)
        {
            if (_loger == null)
                throw new System.Exception("IFrameLoger is not invalid");
            _loger.LogError(msg);
        }
    }
}
